<script type="text/javascript">
    $(document).ready(function(){
        $("#btnRegister").button();
        $("#btnCancel").button();
    })

</script>
<?php use_stylesheet('data/main.css'); ?>
<form action="<?php url_for('/login/newAccount'); ?>" method="post">
    <div id="dvRegistrationBanner">
        <div class="introductiondiv" style="color: #333333; background: url(/images/rect3146.png) bottom repeat-x #E2ECF5;">
            <table  width="100%">
                <tr>
                    <td rowspan="2" lign="left" style="border-right:1px dashed silver;">
                        <div class="registrationpic">
                        </div>
                    </td>
                    <td width="57%" valign="top" style="color: #222222; padding: 0 15px 0 15px;">
                        <div class="introductiontitle" style="text-align: center;">
                            <h1>Welcome to RBIS</h1>
                        </div>
                    </td>
                </tr>
                <tr>
                    <td>
                        <div>
                            <table  class="NewUser" cellpadding="0" cellspacing="5" width="100%" style="height: auto; margin: 0; padding-right:40px;">
                                <tr>
                                    <?php if($sf_user->hasFlash('message')): ?>
                                    <td colspan="4" align="center">
                                        <label class="redFont">
                                            <?php echo $sf_user->getFlash('message'); ?>
                                        </label>
                                    </td>
                                    <?php endif; ?>
                                </tr>
                                <tr>
                                    <th align="right" style="width: 30%; padding: 10px;">
                                        <?php echo $form['firstname']->renderLabel() ?>
                                    </th>
                                    <td colspan="3">
                                        <?php echo $form['firstname']->render(array('class' => 'ui-widget-content ui-corner-all')) ?>
                                    </td>
                                </tr>
                                <tr>
                                    <td></td>
                                    <td colspan="3">
                                        <span class="redFont" style="width: 10px;">
                                            <?php echo $form['firstname']->renderError() ?>
                                        </span>
                                    </td>
                                </tr>
                                <tr>
                                    <th align="right" style="width: 30%; padding: 10px;">
                                        <?php echo $form['lastname']->renderLabel() ?>
                                    </th>
                                    <td colspan="3">
                                        <?php echo $form['lastname']->render(array('class' => 'ui-widget-content ui-corner-all')) ?>
                                    </td>
                                </tr>
                                <tr>
                                    <td></td>
                                    <td colspan="3">
                                        <span class="redFont" style="width: 10px;">
                                            <?php echo $form['lastname']->renderError() ?>
                                        </span>
                                    </td>
                                </tr>
<!--        <tr>
            <th><?php //echo $form['entitytyperefid']->renderLabel() ?></th>
            <td colspan="3"><?php //echo $form['entitytyperefid']->render(array('class' => 'ui-widget-content ui-corner-all')) ?><?php //echo $form['entitytyperefid']->renderError() ?></td>
        </tr>-->
                                <tr>
                                    <th align="right" style="width: 30%; padding: 10px;">
                                        <?php echo $form['emailaddress']->renderLabel() ?>
                                    </th>
                                    <td colspan="3">
                                        <?php echo $form['emailaddress']->render(array('class' => 'ui-widget-content ui-corner-all')) ?>
                                    </td>
                                </tr>
                                <tr>
                                    <td></td>
                                    <td colspan="3">
                                        <span class="redFont" style="width: 10px;">
                                            <?php echo $form['emailaddress']->renderError() ?>
                                        </span>
                                    </td>
                                </tr>
                                <tr>
                                    <th align="right" style="width: 30%; padding: 10px;">
                                        <?php echo $form['password']->renderLabel() ?>
                                    </th>
                                    <td colspan="3">
                                        <?php echo $form['password']->render(array('class' => 'ui-widget-content ui-corner-all')) ?>
                                    </td>
                                </tr>
                                <tr>
                                    <td></td>
                                    <td colspan="3">
                                        <span class="redFont" style="width: 10px;">
                                            <?php echo $form['password']->renderError() ?>
                                        </span>
                                    </td>
                                </tr>
                                <tr>
                                    <th align="right" style="width: 30%; padding: 10px;" nowrap>
                                        <?php echo $form['password_check']->renderLabel() ?>
                                    </th>
                                    <td colspan="3">
                                        <?php echo $form['password_check']->render(array('class' => 'ui-widget-content ui-corner-all')) ?>
                                    </td>
                                </tr>
                                <tr>
                                    <td></td>
                                    <td colspan="3">
                                        <span class="redFont" style="width: 10px;">
                                            <?php echo $form['password_check']->renderError() ?>
                                        </span>
                                    </td>
                                </tr>
                                <tr>
                                    <th colspan="4">
                                        <?php echo $form->renderHiddenFields() ?>
                                    </th>
                                </tr>

        <?php //echo $form; ?>
                                <tr>
                                    <td></td>
                                    <td colspan="2">
                                        <a href="#" style="width: 100%; font-size: 13px;" onclick="$('#tdErrorMessage').html(''); return showAsDialog(400,200, 100,400,true,'dlgResetPassword');" id="lnkForgotPassword">Forgot your password?</a>
                                    </td>
                                    <td colspan="1" align="right" style="padding:10px 20px;width: 10%">
                                        <button id="btnRegister" class="button" style="" type="submit">Register</button>
                        <!--                <a style=" font-size: 12px" id="btnCancel" href="<?php echo url_for('main/index'); ?>" class="button">Cancel</a>-->
                                        <!--<input type="submit" value="Register" id="btnRegister" class="button"/>
                                        <input type="reset" value="Cancel" onclick="window.location='http://localhost/main'"/>-->
                                    </td>
                                </tr>
                            </table>
                        </div>
                    </td>
                </tr>
<!--    <div class="ui-widget form-wizard" style="margin-top: 5px;padding-top: 1px; padding-left: 100px; width: 80%">-->
<!--        </div>-->  
            </table>
        </div>
    </div>
<!--</form>
<div id="boxes">
    <div id="dlgResetPassword1" class="window ui-dialog ui-widget ui-widget-content ui-corner-all">
        <div  class="ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix" style="width: 400px">
            <span class="ui-dialog-title" id="ui-dialog-title-observation-form-dialog">Forgot Password</span>
            <a onclick="javascript:$('.window').hide()" class="ui-dialog-titlebar-close ui-corner-all clickable" role="button">
                <span class="ui-icon ui-icon-closethick">close</span>
            </a>
        </div>
        <table cellpadding="0" cellspacing="0" width="100%" style="padding: 10px; font-size: 90%">
            <tr>
                <td id="tdErrorMessage" colspan="2" align="center">&nbsp;</td>
            </tr>
            <tr>
                <td colspan="2" align="center"><span>To reset your password, type the full email address you use to sign in to your RBIS Account</span></td>
            </tr>
            <tr>
                <td colspan="2">&nbsp;</td>
            </tr>
            <tr>
                <td width="20%">
                    <span>Email:</span>
                </td>
                <td>
                    <input style="width: 90%" type="text" id="txtEmail" class="required"/>
                </td>
            </tr>
            <tr>
                <td colspan="2">&nbsp;</td>
            </tr>
            <tr>
                <td align="center">
                    <a id="lnkResetPassword" class="clickable" onclick="$('#tdErrorMessage').html(''); return sendPasswordResetEmail($('#txtEmail').val(), '<?php echo url_for('login/resetPassword'); ?>');">Submit</a>
                </td>
                <td align="left">
                    <a class="close clickable">Cancel</a>
                </td>
            </tr>
        </table>
    </div>
</div>-->